<extend name="template/base_index"/>

<block name="area_header">
    <link rel="stylesheet" type="text/css" media="all" href="__CSS__/wxshop.css">
    <link type="text/css" rel="stylesheet" src="__CDN__/jquery-uploadify/3.2.1/uploadify.css"/>
    <script type="text/javascript" src="__CDN__/jquery-uploadify/3.2.1/jquery.uploadify.min.js"></script>
    <script type="text/javascript" src="__CDN__/jquery-qrcode/v1.0/jquery.qrcode.min.js"></script>
    <style>

        .img-wrap {
            width: 200px;
            height: 200px;
        }
        .img-wrap img{
            max-width: 100%;
            max-height: 100%;
        }

        .detail {
            height: 100px;
        }

        .ctl {
            padding-left: 300px;
        }

    </style>

</block>

<block name="area_body">
    {:W('Menus/topbar')}
    <div class="admin-main container-fluid">
        {:W('Menus/left')}
        <div class="admin-main-content">
            {:W('Menus/breadcrumb')}
            <h4>产品详情：<strong>{$store.name}</strong></h4>
            <!--产品图片-->
            <volist name="result" id="vo">
                <volist name="vo" id="key" offset="1" length='1'>
                    <div class="img-wrap"><img class="thumbnail" src="{:getImgUrl($vo['pid'])}"/></div>
                    <!--发布者-->
                    <h3>发布者：{$vo.username}</h3>
                    <!--发布时间-->
                    <p>发布时间：{$vo.createtime|date="y-m-d H:i:s",###}</p>
                    <!--产品详情-->
                    <div class="detail">{$vo.synopsis}</div>
                    <div class="ctl">
                        <a href="{:U('Admin/Zengwuxiang/del',array('pid'=>$vo['pid']))}"
                           class="btn btn-danger btn-sm ajax-get confirm"
                           target="_self"><i class="fa fa-trash-o"></i> 删除</a>
                        <a href="{:U('Admin/Zengwuxian/showlist')}" class="btn btn-default btn-sm"><i
                                class="fa fa-trash-o"></i> 返回</a>
                    </div>
                </volist>
            </volist>
        </div>
        <!-- END admin-main-content -->
    </div>
    <!-- END admin-main-->
</block>

<block name="area_footer">
    <script type="text/javascript">
        $(function () {
            $(".onshelf").click(function () {
                $("#searchFormSubmit").click();
            });


            $("a[data-toggle='popover']").click(function () {
                var link = "{:C('SITE_URL')}/index.php/Shop/Index/spxq?id={$vo.id}";

                $('#qrcode').qrcode({width: 125, height: 125, text: link});
            });

        })
    </script>
</block>